﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="NewUser.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>MovieBuddies.Com</title>
    <link href="css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="mainForm" runat="server" method="post">
    <div>
        <fieldset>
        <legend>New User</legend>
            <!-- Username -->
            <label>Username</label>
            <asp:RequiredFieldValidator ID="rfv1" runat="server" 
                ErrorMessage="Username field must be not be blank" 
                ControlToValidate="txtUsername">*</asp:RequiredFieldValidator>
            <asp:TextBox ID="txtUsername" runat="server" EnableViewState="False"></asp:TextBox>
            

            <!-- Password -->
            <label>Password</label>
            <asp:RequiredFieldValidator ID="rfv2" runat="server" 
                ErrorMessage="Password field must be not be blank" 
                ControlToValidate="txtPassword">*</asp:RequiredFieldValidator>
            <asp:TextBox ID="txtPassword" runat="server" EnableViewState="False"></asp:TextBox>
            

            <!-- Email -->
            <label>Email</label>
            <asp:RequiredFieldValidator ID="rfv3" runat="server" 
                ErrorMessage="Email field must be not be blank" 
                ControlToValidate="txtEmail">*</asp:RequiredFieldValidator>
            <asp:TextBox ID="txtEmail" runat="server" EnableViewState="False"></asp:TextBox>

            
            <!-- Confirm Email -->
            <label>Confirm Email</label>
            <asp:CompareValidator ID="cv1" runat="server"
                ErrorMessage="Emails must match" ControlToValidate="txtEmail" 
                ControlToCompare="txtEmail2">*</asp:CompareValidator>
            <asp:TextBox ID="txtEmail2" runat="server" EnableViewState="False"></asp:TextBox>
            
            <asp:Button ID="cmdCreateUser" runat="server" Text="Post" onclick="cmdCreateUser_Click"/>
        
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
        </fieldset>
        
    </div>
    </form>
</body>
</html>
